<!DOCTYPE html>
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system">
<head>
  <meta charset="utf-8">

  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-8cafbcbd78f4.css" />
  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-31dc14e38457.css" />
  <link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-71414d661fe2.css" />
  <link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-ba96c7f1d660.css" />
  <link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-7471c22cdb6a.css" />
  <link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-80180bed15ed.css" />
  <link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-e89b9cdecb75.css" />
  <link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-77f15e9154df.css" />
  <link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-f598f8dd18ae.css" />

  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-primitives-fb1d51d1ef66.css" />
  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-05fec56eb582.css" />
  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-280e28c4e8be.css" />
  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-21dc4e5af19d.css" />
  <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-ca6467096a82.css" />

  <title>GitHub - ponfee/disjob: Disjob is a distributed job scheduling framework</title>

</head>
<!--  https://github.com/ponfee/disjob/blob/master/  =>  https://github.comhttps://github.com/ponfee/disjob/blob/master/  -->

<body class="logged-out env-production page-responsive" style="word-wrap: break-word;">



<div class="clearfix container-xl mt-4 px-md-4 px-lg-5 px-3">


            <readme-toc>

                <div id="readme" class="Box md js-code-block-container js-code-nav-container js-tagsearch-file Box--responsive"
                     data-tagsearch-path="README.md"
                     data-tagsearch-lang="Markdown">

                    <div class="d-flex  js-sticky js-position-sticky top-0 border-top-0 border-bottom p-2 flex-items-center flex-justify-between color-bg-default rounded-top-2"  style="position: sticky; z-index: 30;" >
                        <div class="d-flex flex-items-center">
                            <details
                                data-target="readme-toc.trigger"
                                data-menu-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;trigger&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}"
                                data-menu-hydro-click-hmac="3dacc173fe9c7fe0fd4fafd5ed16bfad95ca2e3b5a6d4e451d59976c35c2f39d"
                                class="dropdown details-reset details-overlay"
                            >
                                <summary
                                    class="btn btn-octicon m-0 mr-2 p-2"
                                    aria-haspopup="true"
                                    aria-label="Table of Contents">
                                    <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-list-unordered">
                                        <path d="M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path>
                                    </svg>
                                </summary>


                                <details-menu class="SelectMenu" role="menu">
                                    <div class="SelectMenu-modal rounded-3 mt-1" style="max-height:340px;">

                                        <div class="SelectMenu-filter">
                                            <input
                                                class="SelectMenu-input form-control js-filterable-field"
                                                id="toc-filter-field"
                                                type="text"
                                                autocomplete="off"
                                                spellcheck="false"
                                                autofocus
                                                placeholder="Filter headings"
                                                aria-label="Filter headings">
                                        </div>

                                        <div class="SelectMenu-list SelectMenu-list--borderless p-2" style="overscroll-behavior: contain;" data-filterable-for="toc-filter-field" data-filterable-type="substring">
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 text-emphasized" style="-webkit-box-orient: vertical; padding-left: 12px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#disjob">Disjob</a>
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 " style="-webkit-box-orient: vertical; padding-left: 24px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#introduction">Introduction</a>
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 " style="-webkit-box-orient: vertical; padding-left: 24px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#architecture">Architecture</a>
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 " style="-webkit-box-orient: vertical; padding-left: 24px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#features">Features</a>
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 " style="-webkit-box-orient: vertical; padding-left: 24px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#download-from-maven-central">Download From Maven Central</a>
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 " style="-webkit-box-orient: vertical; padding-left: 24px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#build-from-source">Build From Source</a>
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 " style="-webkit-box-orient: vertical; padding-left: 24px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#quick-start">Quick Start</a>
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 " style="-webkit-box-orient: vertical; padding-left: 24px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#contributing">Contributing</a>
                                            <a role="menuitem" class="filter-item SelectMenu-item ws-normal wb-break-word line-clamp-2 py-1 " style="-webkit-box-orient: vertical; padding-left: 24px;" data-action="click:readme-toc#blur" data-targets="readme-toc.entries" data-hydro-click="{&quot;event_type&quot;:&quot;repository_toc_menu.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;entry&quot;,&quot;repository_id&quot;:546544025,&quot;originating_url&quot;:&quot;https://github.com/ponfee/disjob&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="af1fd2915121e52ea105d8dd034f2d8c8bae3535e59ba4a02df8826c7adb479d" href="#todo-list">Todo List</a>
                                        </div>
                                    </div>
                                </details-menu>
                            </details>

                            <h2 class="Box-title">
                                <a href="#readme" data-view-component="true" class="Link--primary Link">README.md</a>
                            </h2>
                        </div>
                    </div>

                    <div data-target="readme-toc.content" class="Box-body px-5 pb-5">
                        <article class="markdown-body entry-content container-lg" itemprop="text"><p dir="auto"><a href="http://www.ponfee.cn" rel="nofollow"><img src="https://camo.githubusercontent.com/559966bcefacdbbf7f68995cc8e939f03e29e8e2bac2889900014d6cb77b21ab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f626c6f672d40506f6e6665652d696e666f726d6174696f6e616c2e7376673f6c6f676f3d50656c6963616e" alt="Blog" data-canonical-src="https://img.shields.io/badge/blog-@Ponfee-informational.svg?logo=Pelican" style="max-width: 100%;"></a>
                            <a href="https://www.apache.org/licenses/LICENSE-2.0.html" rel="nofollow"><img src="https://camo.githubusercontent.com/20b3bc1c34ed71700bd0fc067de4d50e73468def345f89780f839e516cacf8b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4170616368652d2d322e302d677265656e2e737667" alt="License" data-canonical-src="https://img.shields.io/badge/license-Apache--2.0-green.svg" style="max-width: 100%;"></a>
                            <a href="https://www.oracle.com/java/technologies/downloads/#java8" rel="nofollow"><img src="https://camo.githubusercontent.com/491e42a3617b89ac8f08a5b249f31d79bd50f7b268e547701840c82d0c9de759/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a646b2d382b2d677265656e2e737667" alt="JDK" data-canonical-src="https://img.shields.io/badge/jdk-8+-green.svg" style="max-width: 100%;"></a>
                            <a href="https://github.com/ponfee/disjob/actions"><img src="https://github.com/ponfee/disjob/workflows/build-with-maven/badge.svg" alt="Build status" style="max-width: 100%;"></a>
                            <a href="https://central.sonatype.com/namespace/cn.ponfee" rel="nofollow"><img src="https://camo.githubusercontent.com/d4e896a34f2211d2a5f4ae36d31eea3a31e684b2837e2bb21b658b5d0e1e4edf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d6176656e2d2d63656e7472616c2d322e302e302d6f72616e67652e7376673f7374796c653d706c6173746963266c6f676f3d6170616368656d6176656e" alt="Maven Central" data-canonical-src="https://img.shields.io/badge/maven--central-2.0.0-orange.svg?style=plastic&amp;logo=apachemaven" style="max-width: 100%;"></a></p>
                            <p dir="auto"><strong><code>简体中文</code></strong> | <a href="https://github.com/ponfee/disjob/blob/master/README.en.md">English</a></p>
                            <h1 tabindex="-1" dir="auto"><a id="user-content-disjob" class="anchor" aria-hidden="true" href="#disjob"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Disjob</h1>
                            <h2 tabindex="-1" dir="auto"><a id="user-content-introduction" class="anchor" aria-hidden="true" href="#introduction"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Introduction</h2>
                            <p dir="auto">一个分布式的任务调度框架，除了具备常规的分布式任务调度功能外，还提供：暂停/取消运行中的任务、恢复执行被暂停的任务、任务拆分、失败重试、广播任务、任务依赖、工作流任务(DAG)、管理器与执行器分离部署、Web管理后台等能力。</p>
                            <p dir="auto">轻量级，简单易用，特别适合长任务的执行。有较好的伸缩性、扩展性、稳定性，历经生产检验。</p>
                            <h2 tabindex="-1" dir="auto"><a id="user-content-architecture" class="anchor" aria-hidden="true" href="#architecture"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Architecture</h2>
                            <ul dir="auto">
                                <li>架构图</li>
                            </ul>
                            <p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://github.com/ponfee/disjob/blob/master/docs/images/architecture.jpg"><img src="https://raw.githubusercontent.com/ponfee/disjob/master/docs/images/architecture.jpg" alt="Architecture" style="max-width: 100%;"></a></p>
                            <ul dir="auto">
                                <li>工程结构</li>
                            </ul>
                            <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="disjob                                                    # 主项目
├── disjob-admin                                          # 基于Ruoyi框架二次开发的Disjob后台管理系统
├── disjob-bom                                            # Maven project bom module
├── disjob-common                                         # 工具包
├── disjob-core                                           # 任务调度相关的核心类（如数据模型、枚举类、抽象层接口等）
├── disjob-dispatch                                       # 任务分发模块
│   ├── disjob-dispatch-api                               # 任务分发的抽象接口层
│   ├── disjob-dispatch-http                              # 任务分发的Http实现
│   └── disjob-dispatch-redis                             # 任务分发的Redis实现
├── disjob-id                                             # 分布式ID生成
├── disjob-registry                                       # Server(Supervisor &amp; Worker)注册模块
│   ├── disjob-registry-api                               # Server注册的抽象接口层
│   ├── disjob-registry-consul                            # Server注册的Consul实现
│   ├── disjob-registry-etcd                              # Server注册的Etcd实现
│   ├── disjob-registry-nacos                             # Server注册的Nacos实现
│   ├── disjob-registry-redis                             # Server注册的Redis实现
│   └── disjob-registry-zookeeper                         # Server注册的Zookeeper实现
├── disjob-reports                                        # 聚合各个模块的测试覆盖率报告
├── disjob-samples                                        # Samples项目
│   ├── disjob-samples-common                             # 存放使用范例中用到的公共代码，包括使用到的一些公共配置文件等
│   ├── disjob-samples-merged                             # Supervisor与Worker合并部署的范例（Spring boot应用）
│   └── disjob-samples-separately                         # Supervisor与Worker分离部署的范例模块
│       ├── disjob-samples-separately-supervisor          # Supervisor单独部署的范例（Spring boot应用）
│       ├── disjob-samples-separately-worker-frameless    # Worker单独部署的范例（非Spring-boot应用，直接main方法启动）
│       └── disjob-samples-separately-worker-springboot   # Worker单独部署的范例（Spring boot应用）
├── disjob-supervisor                                     # Supervisor代码（Spring-boot应用）
├── disjob-test                                           # 用于辅助测试
└── disjob-worker                                         # Worker代码"><pre lang="Plain" class="notranslate"><code>disjob                                                    # 主项目
├── disjob-admin                                          # 基于Ruoyi框架二次开发的Disjob后台管理系统
├── disjob-bom                                            # Maven project bom module
├── disjob-common                                         # 工具包
├── disjob-core                                           # 任务调度相关的核心类（如数据模型、枚举类、抽象层接口等）
├── disjob-dispatch                                       # 任务分发模块
│   ├── disjob-dispatch-api                               # 任务分发的抽象接口层
│   ├── disjob-dispatch-http                              # 任务分发的Http实现
│   └── disjob-dispatch-redis                             # 任务分发的Redis实现
├── disjob-id                                             # 分布式ID生成
├── disjob-registry                                       # Server(Supervisor &amp; Worker)注册模块
│   ├── disjob-registry-api                               # Server注册的抽象接口层
│   ├── disjob-registry-consul                            # Server注册的Consul实现
│   ├── disjob-registry-etcd                              # Server注册的Etcd实现
│   ├── disjob-registry-nacos                             # Server注册的Nacos实现
│   ├── disjob-registry-redis                             # Server注册的Redis实现
│   └── disjob-registry-zookeeper                         # Server注册的Zookeeper实现
├── disjob-reports                                        # 聚合各个模块的测试覆盖率报告
├── disjob-samples                                        # Samples项目
│   ├── disjob-samples-common                             # 存放使用范例中用到的公共代码，包括使用到的一些公共配置文件等
│   ├── disjob-samples-merged                             # Supervisor与Worker合并部署的范例（Spring boot应用）
│   └── disjob-samples-separately                         # Supervisor与Worker分离部署的范例模块
│       ├── disjob-samples-separately-supervisor          # Supervisor单独部署的范例（Spring boot应用）
│       ├── disjob-samples-separately-worker-frameless    # Worker单独部署的范例（非Spring-boot应用，直接main方法启动）
│       └── disjob-samples-separately-worker-springboot   # Worker单独部署的范例（Spring boot应用）
├── disjob-supervisor                                     # Supervisor代码（Spring-boot应用）
├── disjob-test                                           # 用于辅助测试
└── disjob-worker                                         # Worker代码
</code></pre></div>
                            <h2 tabindex="-1" dir="auto"><a id="user-content-features" class="anchor" aria-hidden="true" href="#features"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Features</h2>
                            <ul dir="auto">
                                <li>分为管理器(Supervisor)和执行器(Worker)两种角色，Supervisor与Worker可分离部署</li>
                                <li>Supervisor与Worker通过注册中心相互发现，支持的注册中心有：Redis、Consul、Nacos、Zookeeper、Etcd</li>
                                <li>Supervisor负责生成任务，把任务分发给Worker执行，支持的任务分发方式有：Redis、Http</li>
                                <li>需要指定Job的分组(job-group)，Job的任务只会分发给指定组的Worker执行</li>
                                <li>提供拆分任务的能力，重写拆分方法<a href="https://github.com/ponfee/disjob/blob/master/disjob-core/src/main/java/cn/ponfee/disjob/core/handle/JobSplitter.java">JobHandler#split</a>即可拆分为多个任务，实现任务分治及并行执行</li>
                                <li>支持暂停和取消运行中的任务，已暂停的任务可恢复继续执行，执行失败的任务支持重试</li>
                                <li>支持任务保存(checkpoint)其执行状态，让手动或异常暂停的任务能从上一次的执行状态中恢复继续执行</li>
                                <li>支持广播任务，广播任务会分发给job-group下的所有worker执行</li>
                                <li>支持Job间的依赖，多个Job配置好依赖关系后便会按既定的依赖顺序依次执行</li>
                                <li>支持DAG工作流，可把jobHandler配置为复杂的DAG表达式，如：A-&gt;B,C,(D-&gt;E)-&gt;D,F-&gt;G</li>
                                <li>提供Web管理后台，通过界面进行作业配置，任务监控等</li>
                            </ul>
                            <h2 tabindex="-1" dir="auto"><a id="user-content-download-from-maven-central" class="anchor" aria-hidden="true" href="#download-from-maven-central"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a><a href="https://central.sonatype.com/namespace/cn.ponfee" rel="nofollow">Download From Maven Central</a></h2>
                            <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;dependency&gt;
  &lt;groupId&gt;cn.ponfee&lt;/groupId&gt;
  &lt;artifactId&gt;disjob-{xxx}&lt;/artifactId&gt;
  &lt;version&gt;2.0.0&lt;/version&gt;
&lt;/dependency&gt;"><pre>&lt;<span class="pl-ent">dependency</span>&gt;
  &lt;<span class="pl-ent">groupId</span>&gt;cn.ponfee&lt;/<span class="pl-ent">groupId</span>&gt;
  &lt;<span class="pl-ent">artifactId</span>&gt;disjob-{xxx}&lt;/<span class="pl-ent">artifactId</span>&gt;
  &lt;<span class="pl-ent">version</span>&gt;2.0.0&lt;/<span class="pl-ent">version</span>&gt;
&lt;/<span class="pl-ent">dependency</span>&gt;</pre></div>
                            <h2 tabindex="-1" dir="auto"><a id="user-content-build-from-source" class="anchor" aria-hidden="true" href="#build-from-source"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Build From Source</h2>
                            <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="./mvnw clean install -DskipTests -Dcheckstyle.skip=true -U"><pre>./mvnw clean install -DskipTests -Dcheckstyle.skip=true -U</pre></div>
                            <h2 tabindex="-1" dir="auto"><a id="user-content-quick-start" class="anchor" aria-hidden="true" href="#quick-start"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Quick Start</h2>
                            <ol dir="auto">
                                <li>IDE分别导入项目(分为三个独立的项目，共用一个<code>git</code>仓库)</li>
                            </ol>
                            <ul dir="auto">
                                <li><a href="https://github.com/ponfee/disjob/blob/master/pom.xml">主项目</a></li>
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/pom.xml">samples项目</a></li>
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-admin/pom.xml">后台管理</a></li>
                            </ul>
                            <ol start="2" dir="auto">
                                <li>运行仓库提供的两个SQL脚本：<a href="https://github.com/ponfee/disjob/blob/master/mysql-disjob.sql">mysql-disjob.sql</a>、<a href="https://github.com/ponfee/disjob/blob/master/disjob-admin/mysql-disjob_admin.sql">mysql-disjob_admin.sql</a>创建两个数据库表(也可直接运行<a href="https://github.com/ponfee/disjob/blob/master/disjob-test/src/main/java/cn/ponfee/disjob/test/db/EmbeddedMysqlServerMariaDB.java">内置Mysql</a>，启动时会自动初始化两个SQL脚本)</li>
                            </ol>
                            <ul dir="auto">
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-test/src/main/DB/MariaDB/MariaDB.md">MacOS报“Library not loaded”错误信息参考</a></li>
                                <li>内置的本地mysql server无需用户名密码即可使用</li>
                            </ul>
                            <ol start="3" dir="auto">
                                <li>在<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-common/pom.xml">pom文件</a>中选择注册中心及任务分发的具体实现(默认redis注册中心、http任务分发)</li>
                            </ol>
                            <ul dir="auto">
                                <li>在pom中更改maven依赖即可：disjob-registry-{xxx}、disjob-dispatch-{xxx}</li>
                                <li>项目已内置一些本地启动的server：
                                    <ul dir="auto">
                                        <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-test/src/main/java/cn/ponfee/disjob/test/redis/EmbeddedRedisServerKstyrc.java">内置redis-server</a></li>
                                        <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-registry/disjob-registry-consul/src/test/java/cn/ponfee/disjob/registry/consul/EmbeddedConsulServerPszymczyk.java">内置consul-server</a></li>
                                        <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-registry/disjob-registry-nacos/src/test/java/cn/ponfee/disjob/registry/nacos/EmbeddedNacosServerTestcontainers.java">内置nacos-server</a>（依赖本地docker环境）</li>
                                        <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-registry/disjob-registry-etcd/src/test/java/cn/ponfee/disjob/registry/etcd/EmbeddedEtcdServerTestcontainers.java">内置etcd-server</a>（依赖本地docker环境）</li>
                                        <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-registry/disjob-registry-zookeeper/src/test/java/cn/ponfee/disjob/registry/zookeeper/EmbeddedZookeeperServer.java">内置zookeeper-server</a></li>
                                        <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-common/src/test/java/cn/ponfee/disjob/samples/MysqlAndRedisServerStarter.java">内置Mysql &amp; Redis的合体</a>（建议使用该类来一次启动本地mysql与redis）</li>
                                    </ul>
                                </li>
                            </ul>
                            <ol start="4" dir="auto">
                                <li>修改配置文件</li>
                            </ol>
                            <ul dir="auto">
                                <li>数据库配置：<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/conf-supervisor/application-mysql.yml">Mysql</a></li>
                                <li>注册中心配置：只需配置选择的注册中心即可，如<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-common/src/main/resources/application-consul.yml">Consul注册中心</a>、<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-common/src/main/resources/application-redis.yml">Redis注册中心</a></li>
                                <li>任务分发配置：<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-common/src/main/resources/application-redis.yml">Redis分发</a>、若选择Http分发方式可无需配置</li>
                                <li>其它可按需配置(不配置则会使用默认值)：<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/conf-supervisor">supervisor</a>、<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/conf-worker">worker</a>、<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-common/src/main/resources">web</a></li>
                                <li>非Spring-boot的Worker应用配置文件：<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-separately/disjob-samples-separately-worker-frameless/src/main/resources/worker-conf.yml">worker-conf.yml</a></li>
                            </ul>
                            <ol start="5" dir="auto">
                                <li>启动<a href="https://github.com/ponfee/disjob/blob/master/disjob-samples">samples项目</a>下的各应用，包括</li>
                            </ol>
                            <ul dir="auto">
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-merged/src/main/java/cn/ponfee/disjob/samples/merged/MergedApplication.java">Supervisor与Worker合并部署的Spring boot应用</a></li>
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-separately/disjob-samples-separately-supervisor/src/main/java/cn/ponfee/disjob/samples/supervisor/SupervisorApplication.java">Supervisor单独部署的Spring boot应用</a></li>
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-separately/disjob-samples-separately-worker-springboot/src/main/java/cn/ponfee/disjob/samples/worker/WorkerApplication.java">Worker单独部署的Spring boot应用</a></li>
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-samples/disjob-samples-separately/disjob-samples-separately-worker-frameless/src/main/java/cn/ponfee/disjob/samples/worker/Main.java">Worker单独部署的非Spring-boot应用，直接运行Main方法</a></li>
                                <li>说明：
                                    <ul dir="auto">
                                        <li>已配置不同端口，可同时启动(多个Server组成分布式集群调度环境)</li>
                                        <li>可以在开发工具中运行启动类，也可直接运行构建好的jar包</li>
                                    </ul>
                                </li>
                            </ul>
                            <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@EnableSupervisor
@EnableWorker
public class MergedApplication extends AbstractSamplesApplication {
  public static void main(String[] args) {
    SpringApplication.run(MergedApplication.class, args);
  }
}"><pre><span class="pl-c1">@</span><span class="pl-c1">EnableSupervisor</span>
<span class="pl-c1">@</span><span class="pl-c1">EnableWorker</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">MergedApplication</span> <span class="pl-k">extends</span> <span class="pl-smi">AbstractSamplesApplication</span> {
  <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) {
    <span class="pl-smi">SpringApplication</span>.<span class="pl-en">run</span>(<span class="pl-smi">MergedApplication</span>.<span class="pl-k">class</span>, <span class="pl-s1">args</span>);
  }
}</pre></div>
                            <ol start="6" dir="auto">
                                <li>修改后台管理disjob-admin的配置</li>
                            </ol>
                            <ul dir="auto">
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-admin/ruoyi-disjob/pom.xml">pom.xml</a>中更改maven依赖即可：disjob-registry-{xxx}、disjob-dispatch-{xxx}，默认是redis注册、http分发</li>
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-admin/ruoyi-disjob/src/main/resources/application-disjob-mysql.yml">disjob mysql</a>配置</li>
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-admin/ruoyi-disjob/src/main/resources/application-disjob-redis.yml">redis</a>配置</li>
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-admin/ruoyi-admin/src/main/resources/application-druid.yml">disjob_admin mysql</a>配置（使用的是druid数据源）</li>
                            </ul>
                            <ol start="7" dir="auto">
                                <li>启动disjob-admin</li>
                            </ol>
                            <ul dir="auto">
                                <li><a href="https://github.com/ponfee/disjob/blob/master/disjob-admin/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java">启动java类</a></li>
                                <li>启动成功后浏览器访问 <a href="http://127.0.0.1:80/" rel="nofollow">http://127.0.0.1:80/</a> 进入后台管理系统（用户名密码：admin/admin123）</li>
                                <li>登录后在左侧菜单栏找到<code>调度管理</code>菜单，即可使用后台管理功能
                                    <ul dir="auto">
                                        <li>调度配置：查看、新增、修改等</li>
                                        <li>调度实例：具体时间点的运行实例，一个实例有多个task。鼠标向下滚动可看到第二个分页，第一个分页查询root实例并支持下钻，第二个分页查询所有实例</li>
                                    </ul>
                                </li>
                            </ul>
                            <blockquote>
                                <p dir="auto"><strong>温馨提示：若使用内置的mysql、redis，以上所有配置都无需修改即可启动各应用</strong></p>
                            </blockquote>
                            <h2 tabindex="-1" dir="auto"><a id="user-content-contributing" class="anchor" aria-hidden="true" href="#contributing"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Contributing</h2>
                            <p dir="auto">如有发现bug、更优的实现方案、新特性等，可提交PR或新建<a href="/ponfee/disjob/issues">Issues</a>。</p>
                            <h2 tabindex="-1" dir="auto"><a id="user-content-todo-list" class="anchor" aria-hidden="true" href="#todo-list"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Todo List</h2>
                            <ul class="contains-task-list">
                                <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 扩展注册中心：Zookeeper、Etcd、Nacos</li>
                                <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 工作流任务(Workflow DAG)</li>
                                <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> 任务管理后台、账户体系及权限控制</li>
                                <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 搭建一个关于项目使用说明的文档站点</li>
                                <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 在线查看任务实时运行日志</li>
                                <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 告警订阅：邮件、短信、电话、飞书、钉钉、微信</li>
                                <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 可视化监控BI(Dashboard)</li>
                                <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 增加多种Checkpoint的支持：File System、Hadoop、RocksDB</li>
                            </ul>
                        </article>
                    </div>
                </div>

            </readme-toc>


        </div>



</body>
</html>
